<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/inventoryinfo/goodsin_class/q_goodsIn_class.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/inventoryinfo/goodsin_class/q_goodsIn_class.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'GoodsIn_Id',
                footer: "Foots",
                cnName: '商品入货单',
                name: 'goodsin_class/q_goodsIn_class',
                url: "/q_goodsIn_class/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"GoodsIn_coding":"","GoodsIn_client":"","Remark":"","GoodsIn_num":"","GoodsIn_money":"","AuditStatus":""});
            const editFormOptions = ref([[{"title":"单据编码","field":"GoodsIn_coding","disabled":true,"type":"text"},
                               {"dataKey":"客户","data":[],"title":"客户","required":true,"field":"GoodsIn_client","type":"select"},
                               {"title":"备注","field":"Remark","type":"text"}],
                              [{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","disabled":true,"type":"select"},
                               {"title":"数量","field":"GoodsIn_num","disabled":true,"type":"text"},
                               {"title":"金额","field":"GoodsIn_money","disabled":true,"type":"text"}]]);
            const searchFormFields = ref({"GoodsIn_coding":"","GoodsIn_num":"","GoodsIn_client":"","AuditStatus":""});
            const searchFormOptions = ref([[{"title":"单据编码","field":"GoodsIn_coding","type":"like"},{"title":"数量","field":"GoodsIn_num","type":"text"},{"dataKey":"客户","data":[],"title":"客户","field":"GoodsIn_client","type":"select"},{"dataKey":"audit","data":[],"title":"审核状态","field":"AuditStatus","type":"select"}]]);
            const columns = ref([{field:'GoodsIn_Id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'GoodsIn_coding',title:'单据编码',type:'string',link:true,sort:true,width:210,readonly:true,align:'left',sort:true},
                       {field:'GoodsIn_tepy',title:'类型',type:'int',bind:{ key:'出入库',data:[]},width:110,align:'left'},
                       {field:'GoodsIn_num',title:'数量',type:'int',width:110,readonly:true,align:'left'},
                       {field:'GoodsIn_money',title:'金额',type:'decimal',width:220,readonly:true,align:'left'},
                       {field:'GoodsIn_client',title:'客户',type:'string',bind:{ key:'客户',data:[]},width:110,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:110,readonly:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "商品入货单明细",
                table: "q_goodsInList_class",
                columns: [{field:'GoodsInList_Id',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'GoodsIn_Id',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'GoodsInList_sub',title:'商品编码',type:'string',width:110,readonly:true,edit:{type:''},align:'left',sort:true},
                       {field:'GoodsInList_name',title:'商品名称',type:'string',width:220,readonly:true,edit:{type:''},align:'left'},
                       {field:'GoodsInList_price',title:'单价',type:'decimal',width:110,edit:{type:''},align:'left'},
                       {field:'GoodsInList_num',title:'数量',type:'int',width:110,edit:{type:''},align:'left'},
                       {field:'WHSE_name',title:'库位名称',type:'string',bind:{ key:'库位编码',data:[]},width:110,edit:{type:'select'},align:'left'},
                       {field:'GoodsInList_size',title:'规格',type:'string',width:110,readonly:true,edit:{type:''},align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:220,edit:{type:'text'},align:'left'},
                       {field:'AuditDate',title:'审核时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'审核人员id',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人员',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'创建人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人员id',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人员',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}],
                sortName: "CreateDate",
                key: "GoodsInList_Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
